/**
 * Copyright (c) 2014-2015, IT Group of MK.
 */
package com.mk.ut.sc.stlmt;

import org.junit.After;
import org.junit.AfterClass;
import org.junit.Before;
import org.junit.BeforeClass;
import org.junit.Test;

import com.mk.settlement.service.SettlementRegularService;
import com.mk.ut.BaseJUnit4SpringTest;

/**
 * 结算中心费用结算服务单元测试用例.
 * 
 * @author chuaiqing.
 *
 */
public class SettlementWeeklyTestCase extends BaseJUnit4SpringTest {
    
    /**
     * 测试对象: 费用结算服务
     */
    private SettlementRegularService weeklyService;
    
    /**
     * 初始化单元测试环境.
     * @throws java.lang.Exception
     */
    @BeforeClass
    public static void setUpBeforeClass() throws Exception {
        System.out.println("@BeforeClass: setUpBeforeClass method called.");
    }

    /**
     * 清除单元测试环境.
     * @throws java.lang.Exception
     */
    @AfterClass
    public static void tearDownAfterClass() throws Exception {
        System.out.println("@AfterClass: tearDownAfterClass method called.");
    }

    /**
     * 单元测试方法初始化.
     * @throws java.lang.Exception
     */
    @Before
    public void setUp() throws Exception {
        System.out.println("@Before: setUp method called.");
        weeklyService = (SettlementRegularService) applicationContext.getBean("settlementWeekService");
    }

    /**
     * 单元测试方法卸载.
     * @throws java.lang.Exception
     */
    @After
    public void tearDown() throws Exception {
        System.out.println("@After: tearDown method called.");
    }

    /**
     * 单元测试业务方法: 测试周结算服务类的week方法.
     */
    @Test
    public final void testWeek() {
        System.out.println("@Test: testWeek method called.");
        weeklyService.doSettlement();
    }

}
